<!--
  - Copyright 2016-present the IoT DC3 original author or authors.
  -
  - Licensed under the Apache License, Version 2.0 (the "License");
  - you may not use this file except in compliance with the License.
  - You may obtain a copy of the License at
  -
  -      https://www.apache.org/licenses/LICENSE-2.0
  -
  - Unless required by applicable law or agreed to in writing, software
  - distributed under the License is distributed on an "AS IS" BASIS,
  - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - See the License for the specific language governing permissions and
  - limitations under the License.
  -->

<template>
    <div>
        <base-card>
            <el-tabs v-model="reactiveData.active" @tab-click="changeActive">
                <el-tab-pane label="模板信息" name="detail">
                    <detail-card>
                        <ul>
                            <li>
                                <el-icon>
                                    <List />
                                </el-icon>
                                模板名称: {{ reactiveData.data.profileName }}
                            </li>
                            <li>
                                <el-icon>
                                    <CollectionTag />
                                </el-icon>
                                关联位号: {{ pointLength }} 个
                            </li>
                            <li>
                                <el-icon>
                                    <Management />
                                </el-icon>
                                关联设备: {{ deviceLength }} 个
                            </li>
                            <li>
                                <el-icon>
                                    <Edit />
                                </el-icon>
                                修改日期: {{ timestamp(reactiveData.data.createTime) }}
                            </li>
                            <li>
                                <el-icon>
                                    <Sunset />
                                </el-icon>
                                创建日期: {{ timestamp(reactiveData.data.operateTime) }}
                            </li>
                        </ul>
                    </detail-card>
                </el-tab-pane>
                <el-tab-pane label="关联位号" name="point">
                    <point ref="pointViewRef" :embedded="'profile'" :profile-id="reactiveData.id"></point>
                </el-tab-pane>
                <el-tab-pane label="关联设备" name="device">
                    <device ref="deviceViewRef" :embedded="'profile'" :profile-id="reactiveData.id"></device>
                </el-tab-pane>
                <!-- <el-tab-pane label="模板模型" name="model">
            <el-empty description="暂无模板模型数据!"></el-empty>
        </el-tab-pane> -->
            </el-tabs>
        </base-card>
    </div>
</template>

<script lang="ts" src="./index.ts" />

<style lang="scss">
@use '@/components/card/styles/things-card.scss';
</style>
